package o;

import android.os.Bundle;
import androidx.fragment.app.Fragment;
import com.huawei.hmf.annotation.FragmentDefine;

public class fjm {
    private Fragment ॱ;

    private fjm(Fragment fragment) {
        this.ॱ = fragment;
    }

    public <T> T ॱ() {
        Bundle ˊॱ = this.ॱ.ˊॱ();
        if (ˊॱ == null) {
            return null;
        }
        if (this.ॱ.ॱˋ() != null) {
            return new fje(ˊॱ).ॱ((FragmentDefine) this.ॱ.getClass().getAnnotation(FragmentDefine.class));
        }
        throw new IllegalArgumentException("Activity is null, fragment may not bind to any activity");
    }

    public static fjm ॱ(Fragment fragment) {
        return new fjm(fragment);
    }

    public static fjm ˏ(fiw o_fiw) {
        if (o_fiw instanceof fix) {
            fix o_fix = (fix) o_fiw;
            if (o_fix.ॱ() instanceof Fragment) {
                Fragment fragment = (Fragment) o_fix.ॱ();
                fragment.ʼ(o_fix.ˋ());
                return ॱ(fragment);
            }
            throw new ClassCastException("Fragment must be android.support.v4.app.Fragment");
        }
        throw new ClassCastException("Fragment must be android.support.v4.app.Fragment");
    }

    public <T extends Fragment> T ˏ() {
        return this.ॱ;
    }
}
